package com.entity;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotations.Version;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author wty
 * @since 2022-01-06
 */
@Data
@Accessors(chain = true)
@TableName("task_record")
public class TaskRecord extends Model<TaskRecord> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 添加时间
     */
    @TableField("add_time")
    private String addTime;
    /**
     * 次数
     */
    private Integer once;
    /**
     * 持续时间
     */
    private Integer time;
    /**
     * 任务id
     */
    @TableField("task_id")
    private Integer taskId;
    /**
     * 状态
     */
    private Integer status;


    private String name;

    //本周数据
    @TableField(exist = false)
    private String thisWeek;
    //上周数据
    @TableField(exist = false)
    private String lastWeek;
    //本月数据
    @TableField(exist = false)
    private String thisMonth;
    //上月数据
    @TableField(exist = false)
    private String lastMonth;
    //今年数据
    @TableField(exist = false)
    private String thisYear;
    //昨天数据
    @TableField(exist = false)
    private String yesterday;
    //平均数据
    @TableField(exist = false)
    private String avgData;
    @TableField(exist = false)
    private Boolean flagUp;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
